<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="Transition,com.flashsim.FStEng.Three.Transition,source,stPath,targetID,upLvls" name="keywords">
<title>com.flashsim.FStEng.Three.Transition</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Transition - API Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Flash State Engine, version 3.0</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/flashsim/FStEng/Three/Transition.html&amp;com/flashsim/FStEng/Three/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Transition</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Transition"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.flashsim.FStEng.Three</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Transition</td>
</tr>
</table>
<p></p>
  Creates transitions from source to self, target states, and to history pseudo-states.
  <p>This class is used to create transitions.
  In previous versions of the state engine, we required the developer to specify the relation of the source and target (siblings, ancestors, etc.), but we have removed
  that restriction in version 3.  The processing is hidden from the developer so that making
  and using transitions is as easy as possibly.</p><p>Essentially, when one creates a Transition, one only has to supply
  the target state ID, and the code figures out the path required to accomplish the transition.</p>
  <p>The code figures out the path from the source to the target, by default, at the moment before the state engine
  is activated.  This operation, therefore, can delay the activation of the engine proportional to the number and complexity
  of the state transitions.  To eliminate this delay, the developer can invoke <code>myStateEnginePtr.prepareNetwork()</code> at
  any time that all the states and transitions have been defined.  Then, when <code>myStateEnginePtr.active = true</code> is invoked,
  the engine checks to see if the network has been prepared, and, if so, does not have to compute the transition paths again.</p>
  <p>Transitions can point to themselves -- we call these "transitions to self."  This class permits developers to specify how many
  levels to exit before returning to the same state (see the final argument of the constructor), for transitions to self.</p>
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#source">source</a> : <a href="../Three/State.html">State</a>
<div class="summaryTableDescription">
   Pointer to the source State (HState or HStateC).</div>
</td><td class="summaryTableOwnerCol">Transition</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#stPath">stPath</a> : Array<div class="summaryTableDescription">
   An array consisting of state identifiers from the LCA to the target state.</div>
</td><td class="summaryTableOwnerCol">Transition</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#targetID">targetID</a> : String<div class="summaryTableDescription">
   ID of the target state.</div>
</td><td class="summaryTableOwnerCol">Transition</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#upLvls">upLvls</a> : int<div class="summaryTableDescription">
   The number of levels in the state network to go up to reach the Least Common Ancestor.</div>
</td><td class="summaryTableOwnerCol">Transition</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Transition()">Transition</a>(src:<a href="State.html">State</a>, tid:String, tfn:Function = null, doHistory:Boolean = false, upLevelsForExternalTransition:uint = 0)</div>
<div class="summaryTableDescription">
   Creates a Transition instance.</div>
</td><td class="summaryTableOwnerCol">Transition</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="source"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">source</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var source:<a href="../Three/State.html">State</a></code><p>
   Pointer to the source State (HState or HStateC).
   </p></div>
<a name="stPath"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stPath</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var stPath:Array</code><p>
   An array consisting of state identifiers from the LCA to the target state.
   </p></div>
<a name="targetID"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">targetID</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var targetID:String</code><p>
   ID of the target state.
   Identifier must be unique across all states in the state engine.
   </p></div>
<a name="upLvls"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">upLvls</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var upLvls:int</code><p>
   The number of levels in the state network to go up to reach the Least Common Ancestor.
   </p></div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Transition()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Transition</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Transition(src:<a href="State.html">State</a>, tid:String, tfn:Function = null, doHistory:Boolean = false, upLevelsForExternalTransition:uint = 0)</code><p>
   Creates a Transition instance.
   </p><p>Transition instances are used to connect states.  Transitions are triggered by events, but that information is stored in the
   State to which the Transition is attached.  The transition permits one to invoke a function when the transition is triggered.</p>
   <p>If <code>upLevelsForExternalTransition</code> is supplied, the developer must ensure that the either the source or the target
   is the ancestor of the other.  We cannot verify this at the moment this method is called because the target state may not
   exist yet (it may only be referred to as its id).</p>
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">src</span>:<a href="State.html">State</a></code> &mdash; Source state pointer.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">tid</span>:String</code> &mdash; Target state identifier.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">tfn</span>:Function</code> (default = <code>null</code>)<code></code> &mdash; Transition function -- invoked if the Transition is fired.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">doHistory</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; Boolean value indicating whether or not to go to the History pseudo-state of the target state.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">upLevelsForExternalTransition</span>:uint</code> (default = <code>0</code>)<code></code> &mdash; This is only for external transitions: it lets one control how many parent states upward the engine exits before returning to enter the state again.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
